package org.jshand.jxc.util;

import java.awt.Dimension;
import java.awt.Toolkit;

public class DimensionUtils {

	
	
	public static BusiDime getXY(int width,int height){
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		
		double scWidth = screenSize.getWidth();
		double scHeight = screenSize.getHeight();
		
		int x = (int)(screenSize.getWidth()/2- width/2);
		int y = (int)(screenSize.getHeight()/2- height/2);
		
		return new BusiDime(x, y);
		
	}
	
	public static class BusiDime{
		
		int a;
		int b;
		
		public BusiDime() {
			super();
		}
		
		public BusiDime(int a, int b) {
			super();
			this.a = a;
			this.b = b;
		}
		public int getA() {
			return a;
		}
		public void setA(int a) {
			this.a = a;
		}
		public int getB() {
			return b;
		}
		public void setB(int b) {
			this.b = b;
		}
		
		
		
		
	}
	
	
	
}
